#include "llOption.hpp"
#include "llSystemInfo.hpp"
#include "llMakeDirectory.hpp"
using namespace llmake;

#include <iostream>
using namespace std;
#include <boost/tr1/memory.hpp>
using namespace std::tr1;

shared_ptr<llOption> global_Option;
shared_ptr<llSystemInfo> global_SystemInfo;
shared_ptr<llMakeDirectory> global_Root;

int main(int argc,char * argv[])
{
//	cout<<"__FILE__:("<<__FILE__<<") __LINE__:("<<__LINE__<<")"<<endl;
	global_Option = shared_ptr<llOption>(new llOption(argc,argv));

	global_SystemInfo = shared_ptr<llSystemInfo>(new llSystemInfo());

	string srcRoot = global_Option->getSourceRoot();
	srcRoot = global_SystemInfo->getFullPath(srcRoot);
	srcRoot = global_SystemInfo->simplePath(srcRoot);
//	cout<<"source code root directory "<<srcRoot<<endl;
	
	global_Root = shared_ptr<llMakeDirectory>(new llMakeDirectory(srcRoot));;
	global_Root->doParse();
	global_Root->doExecute();
	return 0;
}
